package com.androidtestintent2.huataixiang;

import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;


/**
 * Created by Administrator on 2017/9/26 0026.
 */

public class music extends Service{
    private MediaPlayer player;
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
    public void onStart(Intent intent,int star){
        super.onStart(intent,star);
        player=MediaPlayer.create(this,R.raw.huataixiang);
        player.start();
    }
    public void onDestroy(){
        super.onDestroy();
        player.stop();
    }
}
